package cn.com.code.design;

/**
 * 模拟单点登录
 * @author zhengpei
 * @date 2021/9/28
 */
public class SsoInterceptor implements HandlerInterceptor {

  @Override
  public boolean preHandle(String request, String response, Object handler) {
    // 模拟获取cookie
    String ticket = request.substring(1, 8);

    return "success".equals(ticket);
  }
}
